<%-- 
    Document   : MostrarPlanEstudio
    Created on : 09/07/2011, 06:50:18 PM
    Author     : Franklin
--%>
<%@ page import = "java.util.LinkedList"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ page import = "Controladores.Form.CrearPlanEstudioForm"%>
<%@ page import = "AccesoBaseDatos.GatewayPlanEstudio"%>
<%@ page import = "ClasesParaConsultaJsp.Curso"%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <link rel="stylesheet" type="text/css" href="arivp89.css" media="screen" />
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <bean:define id="IDPlan" name="IDPlan" scope="session" />
        <% String ID =(String)request.getSession().getAttribute("IDPlan"); %> 
        ID del plan Estudios: <bean:write name="IDPlan"/>
    </br>
    </br>
    <h1>Informacion Plan Estudios</h1>
    <table border="1">
        <tr>
        <td>ID</td>
        <td>Nombre</td>
        <td>Grado</td>
        <td>Total Creditos</td>
        <td>Descripcion</td>
        <td>Ultima Modificacion</td>
        </tr>
        <%       
        LinkedList<CrearPlanEstudioForm> listaIPE = GatewayPlanEstudio.getPlan(ID);
        //out.println(listaP.size());
        for (int i=0;i<listaIPE.size();i++){
           out.println("<tr>");
           out.println("<td>"+listaIPE.get(i).getID()+"</td>");
           out.println("<td>"+listaIPE.get(i).getNombre()+"</td>");
           out.println("<td>"+listaIPE.get(i).getGrado()+"</td>");
           out.println("<td>"+listaIPE.get(i).getCantCreditos()+"</td>");
           out.println("<td>"+listaIPE.get(i).getDescripcion()+"</td>");
           out.println("<td>"+listaIPE.get(i).getUltimaModificacion()+"</td>");
           out.println("</tr>");
        }
        %>
    </table> 
   
    <h1>Cursos del plan de estudios</h1>
    <table border="1">
        <tr>
        <td>Sigla</td>
        <td>Nombre</td>
        <td>Creditos</td>
        <td>Requisitos</td>
        <td>Correquisitos</td>
        <td>Año Curso</td>
        <td>Semestre</td>
        </tr>
        <%    
        LinkedList<Curso> listaC = GatewayPlanEstudio.getCursos(ID);
        //out.println(listaP.size());
        for (int i=0;i<listaC.size();i++){
           out.println("<tr>");
           out.println("<td>"+listaC.get(i).getSigla()+"</td>");
           out.println("<td>"+listaC.get(i).getNombre()+"</td>");
           out.println("<td>"+listaC.get(i).getCreditos()+"</td>");
           out.println("<td>"+listaC.get(i).getRequisito()+"</td>");
           out.println("<td>"+listaC.get(i).getCorrequisito()+"</td>");
           out.println("<td>"+listaC.get(i).getAno()+"</td>");
           out.println("<td>"+listaC.get(i).getSemestre()+"</td>");
           out.println("</tr>");
        }
        %>
    </table> 
    
    
   </br>
   <a href="ConsultarPlanEstudios.jsp#inicio"><- Atrás</a>
    
    
    
    
    </body>
</html>
